var _n32;
var cc__extends = __extends;
var cc__decorate = __decorate;
var cc__importDefault = __importDefault;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $zqcc_OverallSystem = require("zqcc_OverallSystem");
var $1$PifuPageItem = require("PifuPageItem");
var c = cc__importDefault($1$PifuPageItem);
var $1$zqcc_pageBase = require("zqcc_pageBase");
var l = cc__importDefault($1$zqcc_pageBase);
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_PifuPage = function (t) {
  function _ctor() {
    // 初始化变量，确保t存在则调用它，否则返回当前上下文
    var instance = null !== t && t.apply(this, arguments) || this;

    // 设置对象的基本属性
    instance.pageName = "皮肤选择";     // 页面的名称为"皮肤选择"
    instance.item = null;                // 初始化项为null
    instance.scr1 = null;                // 初始化滚动视图1为null
    instance.scrContent1 = null;         // 初始化滚动内容1为null
    instance.listData = null;            // 初始化列表数据为null

    // 返回创建的对象
    return instance;

  }
  cc__extends(_ctor, t);
  _ctor.prototype.onLoad = function () { };
  _ctor.prototype.start = function () {
    this.initGame();
    this._init();
  };
  _ctor.prototype.initGame = function () {
    // 检查并移除所有子项
    if (this.scrContent1) {
      this.scrContent1.removeAllChildren();
    }

    // 定义资源标识符和对应的数量
    var icons = ["biaoqing"];
    var counts = [16];

    // 遍历数量数组，动态创建子项
    for (var o = 0; o < counts.length; o++) {
      var count = counts[o];
      for (var i = 0; i < count; i++) {
        var iconName = icons[o]; // 获取图标名称

        // 实例化新的项并设置其父节点
        var newItem = cc.instantiate(this.item);
        newItem.parent = this.scrContent1;

        // 设置图标及其索引
        newItem.getComponent(c.default).setIcon(iconName, i + 1);
      }
    }

  };
  _ctor.prototype._init = function () {
    this.open();
  };
  _ctor.prototype.OnBtnConfirm = function () { };
  _ctor.prototype.OnBtnClose = function () {
    $zqcc_OverallSystem.mgrs().soundMgr.playBtnSound();
    this.onlyClose();
  };
  cc__decorate([ccp_property(cc.Node)], _ctor.prototype, "item", undefined);
  cc__decorate([ccp_property(cc.Node)], _ctor.prototype, "scr1", undefined);
  cc__decorate([ccp_property(cc.Node)], _ctor.prototype, "scrContent1", undefined);
  return cc__decorate([ccp_ccclass], _ctor);
}(l.default);
exports.default = def_PifuPage;